package com.zenithmind.mall.pojo.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单VO
 * 
 * @author ZenithMind Team
 * @since 2025-06-09
 */
@Data
public class OrderVO {

    /**
     * 订单ID
     */
    private String id;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 收货人信息
     */
    private ReceiverInfo receiverInfo;

    /**
     * 商品总金额
     */
    private BigDecimal productAmount;

    /**
     * 运费
     */
    private BigDecimal shippingFee;

    /**
     * 优惠金额
     */
    private BigDecimal discountAmount;

    /**
     * 实付金额
     */
    private BigDecimal paymentAmount;

    /**
     * 支付方式
     */
    private Integer paymentType;

    /**
     * 支付方式文本
     */
    private String paymentTypeText;

    /**
     * 支付状态
     */
    private Integer paymentStatus;

    /**
     * 支付状态文本
     */
    private String paymentStatusText;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 订单状态文本
     */
    private String statusText;

    /**
     * 订单商品列表
     */
    private List<OrderItemVO> items;

    /**
     * 物流信息
     */
    private ShippingInfo shippingInfo;

    /**
     * 优惠券信息
     */
    private CouponInfo couponInfo;

    /**
     * 订单备注
     */
    private String remark;

    /**
     * 取消原因
     */
    private String cancelReason;

    /**
     * 各种时间
     */
    private TimeInfo timeInfo;

    /**
     * 收货人信息
     */
    @Data
    public static class ReceiverInfo {
        private String name;
        private String phone;
        private String address;
        private String addressDetail;
        private String zip;
    }

    /**
     * 物流信息
     */
    @Data
    public static class ShippingInfo {
        private String company;
        private String no;
        private LocalDateTime shipTime;
        private LocalDateTime receiveTime;
    }

    /**
     * 优惠券信息
     */
    @Data
    public static class CouponInfo {
        private String id;
        private String name;
        private BigDecimal amount;
    }

    /**
     * 时间信息
     */
    @Data
    public static class TimeInfo {
        private LocalDateTime createTime;
        private LocalDateTime paymentTime;
        private LocalDateTime shipTime;
        private LocalDateTime receiveTime;
        private LocalDateTime finishTime;
        private LocalDateTime cancelTime;
    }
}
